home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / hf^k-7.dms / in.adf / envSTM20 / arexx / stormadd.ged next >
Encoding:
Text File  |  1996-01-19  |  1.4 KB  |  63 lines

  1. /* $VER: 1.0, ©1996 Dietmar Eilert. Empty GoldED macro */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  9.  
  10. if (RC ~= 0) then
  11.     exit
  12.  
  13. OPTIONS FAILAT 6                            /* ignore warnings         */
  14.  
  15. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  16.  
  17. /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
  18.  
  19. if (show('P', 'STORMSHELL') = 0) then do
  20.  
  21.     'QUERY CAT'
  22.  
  23.     if (RESULT = "deutsch") then
  24.        'REQUEST STATUS="StormShell wird gestartet..."'
  25.     else
  26.        'REQUEST STATUS="StormShell starting..."'
  27.  
  28.     'RUN CMD="STORMC:StormSYS/StormShell" ASYNC STACK=10000 WAITPORT="STORMSHELL" SECONDS=10'
  29.  
  30.     'REQUEST STATUS=""'
  31. end
  32.  
  33. if (show('p', "STORMSHELL")) then do
  34.  
  35.    'QUERY DOC VAR=FILE'
  36.  
  37.    address STORMSHELL 'ADDFILE FILE ' || file
  38.  
  39. end
  40. else do
  41.  
  42.    'QUERY CAT'
  43.  
  44.    if (RESULT = "deutsch") then
  45.       'REQUEST PROBLEM="StormShell ist nicht gestartet."'
  46.    else
  47.       'REQUEST PROBLEM="StormShell not running."'
  48. end
  49.  
  50. /* ---------------------------- END OF YOUR CODE --------------------- */
  51.  
  52. 'UNLOCK' /* VERY important: unlock GUI */
  53.  
  54. exit
  55.  
  56. SYNTAX:
  57.  
  58. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  59.  
  60. 'UNLOCK'
  61.  
  62. exit
  63.